
import urllib.request

url = 'https://music.163.com/'
headers = {
    'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36'
}
request = urllib.request.Request(url=url,headers=headers)
response = urllib.request.urlopen(request)
content = response.read()
content = content.decode('utf-8')
print(content)

# 保存到文件中
f = open("./download/wyMusic.html",'w',encoding='utf-8')
f.write(content)
f.close()



